/*  cell base class for ND++ minesweeeper game
Programmer:  Prof. Scott

This class will be used as the base class for two types of cells:  bomb cells and non-bomb (called 
quadrant) cells

Two data members that are common to both types of cells for this game are included:  if it is a bomb and
if there is a flag (aka the player thinks it is a bomb).  In addition to the constructor that assumes
this is not a bomb (int bomb = 0), we include get/check functions for the data members and virtual
functions of use to the program because we will use polymorphism to display the grid.  getNeigbors 
and setNeighbors are defined in the base class so we can invoke them polymorphically but neighbors
does not exist in the the base class.  One simple fix is to define this data member in the base
class but we chose to return/do nothing in base class implementations.  

*/

#ifndef CELL_H    // ensure base class header is included only once
#define CELL_H

class Cell {

 public:
  Cell(int = 0);                // constructor; assumes this is not a bomb (0)
  virtual void display() = 0;   // pure virtual function for the display; ensures this is an abstract class
  int checkIfBomb();            // check functions for private data
  int checkIfFlagged();
  void flipFlag();              // flip flagged or not
  virtual int getNeighbors();     //   neighbor functions for quadrant cells that will be invoked with a base class pointer
  virtual void setNeighbors(int);  //  (aka polymorphically)

 private:
  int isBomb;       // 1 if a bomb; 0 otherwise
  int isFlagged;    // 1 if flagged; 0 otherwise

};

#endif
